import json
import app

file=app.Base_road + '/data/test_login.json'

def Login_json():
    with open(file,encoding='utf-8') as f:
        list1=json.load(f)
        list=[]
        for i in list1:
            login_data=i.get('login_data')
            status = i.get('status')
            success = i.get('success')
            code = i.get('code')
            message = i.get('message')
            list.append((login_data,status,success,code,message))
        return list
def meau(case,response,status_code=200,message='成功',success=True,code=10000):
    case.assertEqual(status_code, response.status_code)
    case.assertIn(message, response.json().get("message"))
    case.assertEqual(success, response.json().get('success'))
    case.assertEqual(code, response.json().get('code'))